#ifndef FILE_PATH_TEST_H
#define FILE_PATH_TEST_H

#include "cppunit/TestCase.h"
#include "cppunit/extensions/HelperMacros.h"
#include "file_path.hpp"

using bobs::services::file_path;

class file_path_test : public CppUnit::TestFixture
{
public:
  void setUp() {}

  void tearDown() {}

  void testNew()
  {
    file_path path(".");
  }

  void testNewInvalidPath()
  {
    CPPUNIT_ASSERT_THROW(file_path path(""), std::invalid_argument);
  }

  void testPath()
  {
    string file("./hello.txt");
    file_path path(file);
    CPPUNIT_ASSERT_EQUAL(file, path.string());
  }

  CPPUNIT_TEST_SUITE(file_path_test);
  CPPUNIT_TEST(testNew);
  CPPUNIT_TEST(testNewInvalidPath);
  CPPUNIT_TEST(testPath);
  CPPUNIT_TEST_SUITE_END();
};

#endif
